package com.qhy.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import com.qhy.service.IProTypeService;

@Controller
public class PageController {
	
	@Resource
	private IProTypeService service;
	
	@RequestMapping("{path}.do")
	public String index(HttpServletRequest request, @PathVariable String path) {
		if(request.getSession().getAttribute("all_type") == null) {
			request.getSession().setAttribute("all_type", service.queryAll());
		}
		return path;
	}
	
	
	
	
	
}
